package apps.AfterDlcs.city;

import apps.AfterDlcs.afterDlcsBL.city.CityBL;
import backs.app.AppMenu;
import backs.bean.Message;

public class ShowCity extends AppMenu
{
    AfterDlcsCity afterDlcsCity;
    public ShowCity(AfterDlcsCity afterDlcsCity)
    {
        super("Show","not open",afterDlcsCity);
        this.afterDlcsCity=afterDlcsCity;
        this.showSon=false;
    }

    @Override
    public void handleEqual(Message message)
    {
        String name= CityBL.getCityValue(message.getPrivateAsGroupID(),message.userID,"name",message.userID+"",false);
        int nowPopulation=CityBL.getCityPopulation(message.getPrivateAsGroupID(),message.userID);
        int maxPopulation=CityBL.getCityMaxPopulation(message.getPrivateAsGroupID(),message.userID);
        message.sendBack("city name: "+name+"\npopulation:"+nowPopulation+"/"+maxPopulation);
    }
}
